<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			/*
			   Set:存储的值唯一
			
			*/

			const set = new Set();
			//------------------增-----------------------------------
			set.add(10);
			set.add(20);
			set.add(30);
			set.add(30);
			//------------------删-----------------------------------
			// set.delete(1);
			//------------------查-----------------------------------
			// console.log(set.size);
			set.forEach(function(currentValue) {
				// console.log(currentValue);
			})

			for (let s of set) {
				// console.log(s);
			}


			//------------------数组->Set-----------------------------------
			const arr = [1, 2, 3, 3];
			const set2 = new Set(arr);
			// console.log(set2);
			
			//------------------Set->数组-----------------------------------
			const arr2 = [...set2];
		</script>
	</body>
</html>
